
<!DOCTYPE html>
<html lang="zh-CN" class="loading">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>分类: leetcode百题计划 - peony&#39;s blogs</title>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="google" content="notranslate" />
    <meta name="keywords" content="peony,"> 
    
    <meta name="author" content="peony"> 
    <link rel="alternative" href="atom.xml" title="peony&#39;s blogs" type="application/atom+xml"> 
    <link rel="icon" href="/img/favicon63.png"> 
    
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">

    
<link rel="stylesheet" href="/css/diaspora.css">

    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({
              google_ad_client: "ca-pub-8691406134231910",
              enable_page_level_ads: true
         });
    </script>
    <script async custom-element="amp-auto-ads"
        src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js">
    </script>
<meta name="generator" content="Hexo 4.2.0"></head>

<body class="loading">
    <span id="config-title" style="display:none">peony&#39;s blogs</span>
    <div id="loader"></div>
    <div class="nav">
    <ul id="menu-menu" class="menu">
        
        <li class="pview menu-item menu-item-type-post_type menu-item-object-page">
            <a href="/whoami/" title="Whoami" target="_blank" rel="noopener">Whoami</a>
        </li>
        
        <li class="  menu-item menu-item-type-post_type menu-item-object-page">
            <a href="https://github.com/PPeony" title="Github(目前没有任何项目，除了这篇博客)" target="_blank" rel="noopener">Github(目前没有任何项目，除了这篇博客)</a>
        </li>
        
        <li class="  menu-item menu-item-type-post_type menu-item-object-page">
            <a href="https://leetcode-cn.com/u/peony-2/" title="leetcode" target="_blank" rel="noopener">leetcode</a>
        </li>
        
        <li class="  menu-item menu-item-type-post_type menu-item-object-page">
            <a href="https://blog.csdn.net/qq_15764477" title="CSDN" target="_blank" rel="noopener">CSDN</a>
        </li>
        
        <li class="pview menu-item menu-item-type-post_type menu-item-object-page">
            <a href="/categories/" title="分类" target="_blank" rel="noopener">分类</a>
        </li>
        
    </ul>
    <p id="copyright">
        &copy; 2020 peony.
        Powered by <a href="http://hexo.io/" title="Hexo" target="_blank" rel="noopener">Hexo</a>
        Theme <a href="https://github.com/Fechin/hexo-theme-diaspora" title="Diaspora" target="_blank" rel="noopener">Diaspora</a>
        by Fechin
    </p>
</div>

<div id="container">
    
<div id="screen">
    <div id="mark">
        <div class="layer" data-depth="0.4">
            <img src="/img/welcome-cover2.jpg" id="cover" crossorigin="anonymous" width="1920" height="1080">
        </div>
    </div>
    <div id="vibrant">
        <svg viewBox="0 0 2880 1620" height="100%" preserveAspectRatio="xMaxYMax slice">
            <polygon opacity="0.7" points="2000,1620 0,1620 0,0 600,0 "/>
        </svg>
        <div></div>
    </div>
    <div id="header">
        <div>
            <a class="image-logo" href="/"></a>
            <div class="icon-menu switchmenu"></div>
        </div>
    </div>
    
    <div id="post0">
        <p>三月 22, 2020</p>
        <h2><a href="/2020/03/22/leetcode5179-%E5%B0%86%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E5%8F%98%E5%B9%B3%E8%A1%A1/" title="leetcode5179. 将二叉搜索树变平衡" class="posttitle">leetcode5179. 将二叉搜索树变平衡</a></h2>
        <p class="summary">5179. 将二叉搜索树变平衡

给你一棵二叉搜索树，请你返回一棵 平衡后 的二叉搜索树，新生成的树应该与原来的树...</p>
    </div>
    
</div>

    <div id="primary">
        
<div class="post">
    <a href="/2020/03/22/leetcode5179-%E5%B0%86%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E5%8F%98%E5%B9%B3%E8%A1%A1/" title="leetcode5179. 将二叉搜索树变平衡">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 22, 2020</p>
        <h3><a href="/2020/03/22/leetcode5179-%E5%B0%86%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E5%8F%98%E5%B9%B3%E8%A1%A1/" title="leetcode5179. 将二叉搜索树变平衡" class="posttitle">leetcode5179. 将二叉搜索树变平衡</a></h3>
        <p>5179. 将二叉搜索树变平衡

给你一棵二叉搜索树，请你返回一棵 平衡后 的二叉搜索树，新生成的树应该与原来的树有着相同的节点值。


如果一颗二叉搜索...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode300-%E6%9C%80%E9%95%BF%E4%B8%8A%E5%8D%87%E5%AD%90%E5%BA%8F%E5%88%97/" title="leetcode300. 最长上升子序列">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode300-%E6%9C%80%E9%95%BF%E4%B8%8A%E5%8D%87%E5%AD%90%E5%BA%8F%E5%88%97/" title="leetcode300. 最长上升子序列" class="posttitle">leetcode300. 最长上升子序列</a></h3>
        <p>leetcode300. 最长上升子序列

给定一个无序的整数数组，找到其中最长上升子序列的长度。


示例:


输入: [10,9,2,5,3,7,1...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode971-%E7%BF%BB%E8%BD%AC%E4%BA%8C%E5%8F%89%E6%A0%91%E4%BB%A5%E5%8C%B9%E9%85%8D%E5%85%88%E5%BA%8F%E9%81%8D%E5%8E%86/" title="leetcode971. 翻转二叉树以匹配先序遍历">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode971-%E7%BF%BB%E8%BD%AC%E4%BA%8C%E5%8F%89%E6%A0%91%E4%BB%A5%E5%8C%B9%E9%85%8D%E5%85%88%E5%BA%8F%E9%81%8D%E5%8E%86/" title="leetcode971. 翻转二叉树以匹配先序遍历" class="posttitle">leetcode971. 翻转二叉树以匹配先序遍历</a></h3>
        <p>leetcode971. 翻转二叉树以匹配先序遍历
这道题的说明还没有题目清晰,所以不粘题内容了.
思路前序遍历,遇到当前节点和对应的voyage值不相等...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode1372-%E4%BA%8C%E5%8F%89%E6%A0%91%E4%B8%AD%E7%9A%84%E6%9C%80%E9%95%BF%E4%BA%A4%E9%94%99%E8%B7%AF%E5%BE%84/" title="leetcode1372. 二叉树中的最长交错路径">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode1372-%E4%BA%8C%E5%8F%89%E6%A0%91%E4%B8%AD%E7%9A%84%E6%9C%80%E9%95%BF%E4%BA%A4%E9%94%99%E8%B7%AF%E5%BE%84/" title="leetcode1372. 二叉树中的最长交错路径" class="posttitle">leetcode1372. 二叉树中的最长交错路径</a></h3>
        <p>leetcode1372. 二叉树中的最长交错路径

给你一棵以 root 为根的二叉树，二叉树中的交错路径定义如下：

选择二叉树中 任意 节点和一个方...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode958-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E5%AE%8C%E5%85%A8%E6%80%A7%E6%A3%80%E9%AA%8C/" title="leetcode958. 二叉树的完全性检验">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode958-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9A%84%E5%AE%8C%E5%85%A8%E6%80%A7%E6%A3%80%E9%AA%8C/" title="leetcode958. 二叉树的完全性检验" class="posttitle">leetcode958. 二叉树的完全性检验</a></h3>
        <p>leetcode958. 二叉树的完全性检验

给定一个二叉树，确定它是否是一个完全二叉树。


百度百科中对完全二叉树的定义如下：


若设二叉树的深度...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode501-%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E4%B8%AD%E7%9A%84%E4%BC%97%E6%95%B0/" title="leetcode501. 二叉搜索树中的众数">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode501-%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E4%B8%AD%E7%9A%84%E4%BC%97%E6%95%B0/" title="leetcode501. 二叉搜索树中的众数" class="posttitle">leetcode501. 二叉搜索树中的众数</a></h3>
        <p>leetcode501. 二叉搜索树中的众数

给定一个有相同值的二叉搜索树（BST），找出 BST 中的所有众数（出现频率最高的元素）。


假定 BS...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode5354-%E9%80%9A%E7%9F%A5%E6%89%80%E6%9C%89%E5%91%98%E5%B7%A5%E6%89%80%E9%9C%80%E7%9A%84%E6%97%B6%E9%97%B4/" title="leetcode5354. 通知所有员工所需的时间">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode5354-%E9%80%9A%E7%9F%A5%E6%89%80%E6%9C%89%E5%91%98%E5%B7%A5%E6%89%80%E9%9C%80%E7%9A%84%E6%97%B6%E9%97%B4/" title="leetcode5354. 通知所有员工所需的时间" class="posttitle">leetcode5354. 通知所有员工所需的时间</a></h3>
        <p>leetcode5354. 通知所有员工所需的时间

公司里有 n 名员工，每个员工的 ID 都是独一无二的，编号从 0 到 n - 1。公司的总负责人通...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode450-%E5%88%A0%E9%99%A4%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E4%B8%AD%E7%9A%84%E8%8A%82%E7%82%B9/" title="leetcode450. 删除二叉搜索树中的节点">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode450-%E5%88%A0%E9%99%A4%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E4%B8%AD%E7%9A%84%E8%8A%82%E7%82%B9/" title="leetcode450. 删除二叉搜索树中的节点" class="posttitle">leetcode450. 删除二叉搜索树中的节点</a></h3>
        <p>leetcode450. 删除二叉搜索树中的节点

给定一个二叉搜索树的根节点 root 和一个值 key，删除二叉搜索树中的 key 对应的节点，并保证...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode1145-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9D%80%E8%89%B2%E6%B8%B8%E6%88%8F/" title="leetcode1145. 二叉树着色游戏">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode1145-%E4%BA%8C%E5%8F%89%E6%A0%91%E7%9D%80%E8%89%B2%E6%B8%B8%E6%88%8F/" title="leetcode1145. 二叉树着色游戏" class="posttitle">leetcode1145. 二叉树着色游戏</a></h3>
        <p>leetcode1145. 二叉树着色游戏

有两位极客玩家参与了一场「二叉树着色」的游戏。游戏中，给出二叉树的根节点 root，树上总共有 n 个节点，...</p>
    </div>
</div>


<div class="post">
    <a href="/2020/03/14/leetcode623-%E5%9C%A8%E4%BA%8C%E5%8F%89%E6%A0%91%E4%B8%AD%E5%A2%9E%E5%8A%A0%E4%B8%80%E8%A1%8C/" title="leetcode623. 在二叉树中增加一行">
        <img src="/img/default.png" class="cover" width="680" height="440">
    </a>
    <div class="else">
        <p>三月 14, 2020</p>
        <h3><a href="/2020/03/14/leetcode623-%E5%9C%A8%E4%BA%8C%E5%8F%89%E6%A0%91%E4%B8%AD%E5%A2%9E%E5%8A%A0%E4%B8%80%E8%A1%8C/" title="leetcode623. 在二叉树中增加一行" class="posttitle">leetcode623. 在二叉树中增加一行</a></h3>
        <p>leetcode623. 在二叉树中增加一行

给定一个二叉树，根节点为第1层，深度为 1。在其第 d 层追加一行值为 v 的节点。


添加规则：给定一...</p>
    </div>
</div>


    </div>
    
    <div id="pager"><a href="/categories/leetcode%E7%99%BE%E9%A2%98%E8%AE%A1%E5%88%92/diaspora/4/" class="more">加载更多</a></div>
    
</div>
<div id="preview"></div>


</body>

<script src="//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.min.js"></script>


<script src="//lib.baomitu.com/jquery/1.8.3/jquery.min.js"></script>
<script src="/js/plugin.js"></script>
<script src="/js/diaspora.js"></script>


<link rel="stylesheet" href="/photoswipe/photoswipe.css">
<link rel="stylesheet" href="/photoswipe/default-skin/default-skin.css">


<script src="/photoswipe/photoswipe.min.js"></script>
<script src="/photoswipe/photoswipe-ui-default.min.js"></script>


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>
    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">
        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>
        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">
            <div class="pswp__top-bar">
                <!--  Controls are self-explanatory. Order can be changed. -->
                <div class="pswp__counter"></div>
                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
                <button class="pswp__button pswp__button--share" title="Share"></button>
                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>
            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>
            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>
            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>
        </div>
    </div>
</div>




</html>
